# -*- coding: utf-8 -*-
from __future__ import unicode_literals

from django.contrib import admin

from .models import Topic, TopicReply, CommunityBanner


@admin.register(Topic)
class TopicAdmin(admin.ModelAdmin):
    list_display = ['title', 'user', 'add_time']
    search_fields = ['title', 'user', 'add_time']
    list_filter = ['title', 'user', 'add_time']


@admin.register(TopicReply)
class TopicReplyAdmin(admin.ModelAdmin):
    list_display = ['topic', 'user', 'add_time']
    search_fields = ['topic', 'user', 'add_time']
    list_filter = ['topic', 'user', 'add_time']


@admin.register(CommunityBanner)
class CommunityBannerAdmin(admin.ModelAdmin):
    list_display = ['title', 'index']
